<?php
session_start();
include "functions/init_bdd.php";
include 'functions/fct_account.php';

/*create an article*/

$id = $_SESSION['id'];

$params = array();
$params[0] = $_POST['id'];
$params[1] = $_POST['text'];
$params[2] = $id;
$params[3] = date("Y-m-d");

$result = create_comment($params);
if ($result == 1)
	header("Location: zone.php?id=$id");
else
	header("Location: ../index.php");
?>